package cn.liurong.spring.view.thymeleaf.web;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.impl.SimpleLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.liurong.spring.view.thymeleaf.service.HelloSericeImpl;

@Controller
public class HelloCotroller {
	private static final Log log = new SimpleLog("HelloCotroller");
	@Autowired
	private HelloSericeImpl helloSerice;

	@RequestMapping("/home")
	public String initData(HttpServletRequest httpRequest) {
		log.info("进入home");
		httpRequest.setAttribute("initData", helloSerice.initDate());
		return "home";
	}
}
